ghacks-clear-57-[changes-only].js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. (function() {
  2. let ops = [
  3. '_user.js.parrot',
  4. /* --- 57-alpha --- */
  5. /* commented out */
  6. 'browser.storageManager.enabled',
  7. 'dom.storageManager.enabled',
  8. /* removed from the user.js */
  9. 'browser.search.geoip.timeout',
  10. 'geo.wifi.xhr.timeout',
  11. 'gfx.layerscope.enabled',
  12. 'media.webspeech.recognition.enable',
  13. /* moved to RFP ALTERNATIVES */
  14. 'dom.w3c_touch_events.enabled',
  15. 'media.video_stats.enabled',
  16. /* moved to DEPRECATED/REMOVED */
  17. 'browser.bookmarks.showRecentlyBookmarked',
  18. 'browser.casting.enabled',
  19. 'devtools.webide.autoinstallFxdtAdapters',
  20. 'media.eme.chromium-api.enabled',
  21. 'social.directories',
  22. 'social.enabled',
  23. 'social.remote-install.enabled',
  24. 'social.share.activationPanelEnabled',
  25. 'social.shareDirectory',
  26. 'social.toast-notifications.enabled',
  27. 'social.whitelist'
  28. ]
  29. if("undefined" === typeof(Services)) {
  30. alert("about:config needs to be the active tab!");
  31. return;
  32. }
  33. let c = 0;
  34. for (let i = 0, len = ops.length; i < len; i++) {
  35. if (Services.prefs.prefHasUserValue(ops[i])) {
  36. Services.prefs.clearUserPref(ops[i]);
  37. if (!Services.prefs.prefHasUserValue(ops[i])) {
  38. console.log("reset", ops[i]);
  39. c++;
  40. } else { console.log("failed to reset", ops[i]); }
  41. }
  42. }
  43. focus();
  44. let d = (c==1) ? " pref" : " prefs";
  45. if (c > 0) {
  46. alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
  47. } else { alert("nothing to reset"); }
  48. })();